package com.cl.pattern.command;

/**
 * 测试类
 */
public class Test {
    public static void main(String[] args) {
        Receiver receiver = new Receiver();
        Invoker invoker = new Invoker();
        Command turnOnLight = new LightOnCommand(receiver);
        Command turnOffLight = new LightOffCommand(receiver);
        invoker.execute(turnOnLight);
        invoker.execute(turnOffLight);
    }
}